import 'package:flutter/material.dart';
import 'package:get/get.dart';

class FutureDemoPage extends StatefulWidget {
  const FutureDemoPage({super.key});

  @override
  State<FutureDemoPage> createState() => _FutureDemoPageState();
}

class _FutureDemoPageState extends State<FutureDemoPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: const Text("Future Demo")),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                child: const Text("FutureBuilder"),
                onPressed: () async {
                  Get.toNamed("/futurebuilderdemo");
                },
              ),
              const SizedBox(height: 30),
              ElevatedButton(
                child: const Text("StreamBuilder"),
                onPressed: () {
                  Get.toNamed("/streambuilderdemo");
                },
              ),
              const SizedBox(height: 30),
              ElevatedButton(
                child: const Text("StreamBuilderGame"),
                onPressed: () {
                  Get.toNamed("/streambuildergame");
                },
              )
            ],
          ),
        ));
  }
}
